using System;
using System.Collections.Generic;
using ICSharpCode.TextEditor;
using ICSharpCode.TextEditor.Document;

namespace DukeyCssFetch
{
	// Token: 0x02000010 RID: 16
	public class HighlightGroup : IDisposable
	{
		// Token: 0x060000A0 RID: 160 RVA: 0x0000AAB0 File Offset: 0x00008CB0
		public HighlightGroup(TextEditorControl editor)
		{
			this.list_0 = new List<TextMarker>();
			
			this.textEditorControl_0 = editor;
			this.idocument_0 = editor.Document;
		}

		// Token: 0x060000A1 RID: 161 RVA: 0x0000AADC File Offset: 0x00008CDC
		public void AddMarker(TextMarker marker)
		{
			this.list_0.Add(marker);
			this.idocument_0.MarkerStrategy.AddMarker(marker);
		}

		// Token: 0x060000A2 RID: 162 RVA: 0x0000AAFC File Offset: 0x00008CFC
		public void ClearMarkers()
		{
			foreach (TextMarker current in this.list_0)
			{
				this.idocument_0.MarkerStrategy.RemoveMarker(current);
			}
			this.list_0.Clear();
			this.textEditorControl_0.Refresh();
		}

		// Token: 0x060000A3 RID: 163 RVA: 0x0000AB70 File Offset: 0x00008D70
		public void Dispose()
		{
			this.ClearMarkers();
			GC.SuppressFinalize(this);
		}

		// Token: 0x060000A4 RID: 164 RVA: 0x0000AB80 File Offset: 0x00008D80
		~HighlightGroup()
		{
			this.Dispose();
		}

		// Token: 0x17000009 RID: 9
		public IList<TextMarker> Markers
		{
			// Token: 0x060000A5 RID: 165 RVA: 0x0000ABB0 File Offset: 0x00008DB0
			get
			{
				return this.list_0.AsReadOnly();
			}
		}

		// Token: 0x040000D9 RID: 217
		private IDocument idocument_0;

		// Token: 0x040000D7 RID: 215
		private List<TextMarker> list_0;

		// Token: 0x040000D8 RID: 216
		private TextEditorControl textEditorControl_0;
	}
}
